<template>
  <div>
    <el-collapse-transition>
      <el-card shadow="never" :body-style="{ padding: '20px 10px 0px 20px' }">
        <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
          <el-form-item>
            <el-input v-model="dataForm.bizId" placeholder="业务id" clearable></el-input>
          </el-form-item>
          <el-form-item>
            <el-button @click="getReport()" type="primary">{{ $t('query') }}</el-button>
            <el-button @click="searchReset()">{{ $t('reset') }}</el-button>
          </el-form-item>
        </el-form>
      </el-card>
    </el-collapse-transition>
    <el-card shadow="never" class="aui-card--fill" :style="searchShow?'margin-top: 10px;':''">
      <iframe :src="reportUrl" height="1200" width="100%" frameborder=”no” border=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” allowtransparency=”yes”></iframe>
    </el-card>
  </div>
</template>
<script>
export default {
  data () {
    return {
      reportUrl: '',
      searchShow: true,
      dataForm: {
        bizId: ''
      }
    }
  },
  methods: {
    searchShowHandle () {
      this.searchShow = !this.searchShow
    },
    getReport () {
      let token = this.$cookies.get('token')
      let frUrl = `${window.SITE_CONFIG['frURL']}/view/report?viewlet=demo/basic/产品明细.cpt&id=${this.dataForm.bizId}&uniedp_token=${token}`
      this.reportUrl = frUrl
    }
  }
}
</script>
